<!DOCTYPE html>
<html>
<head>
    <title>检查本地存储</title>
</head>
<body>
    <h1>本地存储检查</h1>
    <div id="result"></div>
    
    <script>
        const resultDiv = document.getElementById('result');
        let output = '';
        
        // 检查selectedBaseUrl
        const savedUrl = localStorage.getItem('selectedBaseUrl');
        output += '<h3>保存的baseUrl:</h3>';
        output += '<p>' + (savedUrl || '未设置') + '</p>';
        
        // 检查所有本地存储
        output += '<h3>所有本地存储:</h3>';
        for (let i = 0; i < localStorage.length; i++) {
            const key = localStorage.key(i);
            const value = localStorage.getItem(key);
            output += '<p><strong>' + key + ':</strong> ' + value + '</p>';
        }
        
        resultDiv.innerHTML = output;
        
        // 检查网络连接
        output += '<h3>网络连接测试:</h3>';
        const testUrls = [
            'http://10.76.83.96:48000/admin-api/system/user/update',
            'http://172.168.1.11:48000/admin-api/system/user/update',
            'http://172.168.1.10:48000/admin-api/system/user/update',
            'http://192.168.8.66:48080/admin-api/system/user/update'
        ];
        
        testUrls.forEach(url => {
            fetch(url, { method: 'OPTIONS' })
                .then(response => {
                    output += '<p style="color: green;">✓ ' + url + ' - 连接成功</p>';
                    resultDiv.innerHTML = output;
                })
                .catch(error => {
                    output += '<p style="color: red;">✗ ' + url + ' - 连接失败: ' + error.message + '</p>';
                    resultDiv.innerHTML = output;
                });
        });
    </script>
</body>
</html>